package com.demo.springcloud.controller;

import com.demo.springcloud.pojo.CommonResult;
import com.demo.springcloud.pojo.Payment;
import com.demo.springcloud.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenyuan
 * @date 2020/12/23 11:16
 */
@RestController
public class FeignController {
	@Autowired
	private FeignService feignService;

	@GetMapping(value = "/consumer/feign/{id}")
	public CommonResult<Payment> paymentSQL(@PathVariable("id") Long id) {
		return feignService.paymentSQL(id);
	}
}
